
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>传悦案例</title>
		<link rel="stylesheet" href="iconfont/iconfont.css">
		<link rel="stylesheet" type="text/css" href="css/reset.css" />
		<link rel="stylesheet" type="text/css" href="css/header.css" />
		<link rel="stylesheet" type="text/css" href="css/footer.css" />
		<link rel="stylesheet" type="text/css" href="css/exam.css" />
		<style>
			#template {
				display: none;
			}
			#examList a{
				color: #333333;
			}
		</style> 
	</head>
	<body>
		<header>
			<div class="top">
				<div class="top_con">
					<img src="img/logo.png" />
					<ul class="top_r">
						<li class="icon_first">
							<span class="iconfont icon-dianhua"></span>
							<i>0503-60652189</i>
						</li>
						<li>
							<span class="iconfont icon-qq"></span>
						</li>
						<li>
							<span class="iconfont icon-wb"></span>
						</li>
						<li>
							<span class="iconfont icon-weixin"></span>
						</li>
						<li>
							<span class="iconfont icon-youxiang"></span>
						</li>
					</ul>
					<ul class="top_c">
						<li><a href="index.html">网站首页</a></li>
						<li><a href="#">传悦资源</a></li>
						<li style="background-color: #dd4012;color: #ffffff;"><a href="#">传悦案例</a></li>
						<li><a href="#">传悦服务</a></li>
						<li><a href="solu.html">解决方案</a></li>
						<li><a href="#">需求提交</a></li>
					</ul>
				</div>
			</div>
		</header>
		<div class="banner">
			<div class="banner_b">
				<div class="banner_b_con">
					<span>网站首页</span>
					<span>></span>
					<span>传悦案例</span>
				</div>
			</div>
		</div>
		<div class="center">
			<ul class="title">
				<li>全部</li>
				<li>网站建设</li>
				<li>推广运营</li>
				<li>品牌策划</li>
				<li>网络全案</li>
			</ul>
			<div class="center_con">
				<ul id="examList">
					<li id="template">
						<a href="examdetails.html">
							<img src="" class="faceimg">
							<h2 class="title"></h2>
							<span></span>
							<p class="tag"></p>
						</a>
					</li>
				</ul>
			</div>
			<div class="btnbox">
				<span>&lt;</span>
				<span>1</span>
				<span style="background-color: #dd4012; color: #FFFFFF;">2</span>
				<span>3</span>
				<span>4</span>
				<span>&gt;</span>
			</div>
		</div>
		<footer>
			<div class="bottom">
				<div class="logo_min">
					<img src="img/logo-min.png">
				</div>
				<div class="bot_right">
					<ul class="b_r">
						<li>
							<a href="#">关于传悦</a>
						</li>
						<li>
							<a href="#">新闻动态</a>
						</li>
						<li>
							<a href="#">传悦观点</a>
						</li>
						<li>
							<a href="#">联系传悦</a>
						</li>
						<li>
							<a href="#">加入传悦</a>
						</li>
						<li>
							<a href="#">付款账户</a>
						</li>
					</ul>
					<div class="b_l">
						<span>Copyright&copy;2013</span>
						<span>创梦网络科技有限责任公司</span>
						<span>||</span>
						<span>传悦 Chnyoo.cn All Rights Reserved</span>
						<span>京ICP备12005221号</span>
					</div>
				</div>
			</div>
		</footer>
	</body>
</html>
<script src="jquery.min.js"></script>
<script>
	//$(function(){
		$.ajax({
			url: "http://127.0.0.1:8080/caselist",
			success: function(data) {
				JSON.parse(data).forEach(function(item) {
					let newItem = $("#template").clone(true);
					newItem.attr("id", "");
					newItem.find(".faceimg").attr("src", item.faceImg);
					newItem.find(".title").html(item.title);
					newItem.find(".tag").html(item.tag);
					newItem.find("a").attr("href",`${newItem.find("a").attr("href")}?id=${item.id}`)
					newItem.appendTo($("#examList"));
				})
			}
		})
	//})
</script>
